
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>010封装与关键字Static · 书名</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="作者">
        <meta name="identifier" content="图书编号" scheme="ISBN">
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-intopic-toc/style.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-flexible-alerts/style.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-theme-comscore/test.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="011 继承.html" />
    
    
    <link rel="prev" href="009构造方法.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    书名
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Books</li>
        
        
    
        <li class="chapter " data-level="2.1" >
            
                <span>
            
                    
                    Java
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.1" data-path="001环境变量.html">
            
                <a href="001环境变量.html">
            
                    
                    001环境变量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2" data-path="002Java初体验.html">
            
                <a href="002Java初体验.html">
            
                    
                    002Java初体验
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3" data-path="003变量命名及数据类型.html">
            
                <a href="003变量命名及数据类型.html">
            
                    
                    003变量命名及数据类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4" data-path="004运算符.html">
            
                <a href="004运算符.html">
            
                    
                    004运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.5" data-path="005选择结构.html">
            
                <a href="005选择结构.html">
            
                    
                    005选择结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.6" data-path="006循环结构.html">
            
                <a href="006循环结构.html">
            
                    
                    006循环结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.7" data-path="007数组.html">
            
                <a href="007数组.html">
            
                    
                    007数组
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.8" data-path="008类和对象方法.html">
            
                <a href="008类和对象方法.html">
            
                    
                    008类和对象方法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.9" data-path="009构造方法.html">
            
                <a href="009构造方法.html">
            
                    
                    009构造方法
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="2.1.10" data-path="010封装与关键字static.html">
            
                <a href="010封装与关键字static.html">
            
                    
                    010封装与关键字Static
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.11" data-path="011 继承.html">
            
                <a href="011 继承.html">
            
                    
                    011 继承
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.12" data-path="012方法重写.html">
            
                <a href="012方法重写.html">
            
                    
                    012方法重写
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.13" data-path="013多态.html">
            
                <a href="013多态.html">
            
                    
                    013多态
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.14" data-path="014抽象类抽象方法.html">
            
                <a href="014抽象类抽象方法.html">
            
                    
                    014抽象类抽象方法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.15" data-path="015接口.html">
            
                <a href="015接口.html">
            
                    
                    015接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.16" data-path="016异常.html">
            
                <a href="016异常.html">
            
                    
                    016异常
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.17" data-path="017集合.html">
            
                <a href="017集合.html">
            
                    
                    017集合
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.18" data-path="017集合2.html">
            
                <a href="017集合2.html">
            
                    
                    017集合2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.19" data-path="018泛型.html">
            
                <a href="018泛型.html">
            
                    
                    018泛型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.20" data-path="019Collections算法类.html">
            
                <a href="019Collections算法类.html">
            
                    
                    019Collections算法类
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.21" data-path="020枚举.html">
            
                <a href="020枚举.html">
            
                    
                    020枚举
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.22" data-path="021包装类.html">
            
                <a href="021包装类.html">
            
                    
                    021包装类
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.23" data-path="022常用类.html">
            
                <a href="022常用类.html">
            
                    
                    022常用类
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.24" data-path="023File类.html">
            
                <a href="023File类.html">
            
                    
                    023File类
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.25" data-path="024IO流.html">
            
                <a href="024IO流.html">
            
                    
                    024IO流
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.26" data-path="025多线程.html">
            
                <a href="025多线程.html">
            
                    
                    025多线程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.27" data-path="025多线程线程池.html">
            
                <a href="025多线程线程池.html">
            
                    
                    025多线程线程池
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.28" data-path="026网络编程Socket.html">
            
                <a href="026网络编程Socket.html">
            
                    
                    026网络编程Socket
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.29" data-path="027XML解析.html">
            
                <a href="027XML解析.html">
            
                    
                    027XML解析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.30" data-path="028 注解.html">
            
                <a href="028 注解.html">
            
                    
                    028 注解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.31" data-path="029 Lambda表达式.html">
            
                <a href="029 Lambda表达式.html">
            
                    
                    029 Lambda表达式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.32" data-path="029 反射.html">
            
                <a href="029 反射.html">
            
                    
                    029 反射
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2" >
            
                <span>
            
                    
                    Mybatis
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1" data-path="../mybatis/MyBatis.html">
            
                <a href="../mybatis/MyBatis.html">
            
                    
                    MyBatis
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1.1" >
            
                <span>
            
                    
                    MyBatis
            
                </span>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.3" >
            
                <span>
            
                    
                    Mysql
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.3.1" data-path="../mysql/01 SQL通用语法.html">
            
                <a href="../mysql/01 SQL通用语法.html">
            
                    
                    01 SQL通用语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.2" data-path="../mysql/02 DDL.html">
            
                <a href="../mysql/02 DDL.html">
            
                    
                    02 DDL
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.3" data-path="../mysql/03 DML.html">
            
                <a href="../mysql/03 DML.html">
            
                    
                    03 DML
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.4" data-path="../mysql/04 DQL.html">
            
                <a href="../mysql/04 DQL.html">
            
                    
                    04 DQL
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.5" data-path="../mysql/05 DCL.html">
            
                <a href="../mysql/05 DCL.html">
            
                    
                    05 DCL
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.6" data-path="../mysql/06 函数.html">
            
                <a href="../mysql/06 函数.html">
            
                    
                    06 函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.7" data-path="../mysql/07 约束.html">
            
                <a href="../mysql/07 约束.html">
            
                    
                    07 约束
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.8" data-path="../mysql/08 多表查询.html">
            
                <a href="../mysql/08 多表查询.html">
            
                    
                    08 多表查询
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.9" data-path="../mysql/09 事务.html">
            
                <a href="../mysql/09 事务.html">
            
                    
                    09 事务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.10" data-path="../mysql/999zzz.html">
            
                <a href="../mysql/999zzz.html">
            
                    
                    999zzz
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.11" data-path="../mysql/MySql.html">
            
                <a href="../mysql/MySql.html">
            
                    
                    MySql
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.12" data-path="../mysql/sql.html">
            
                <a href="../mysql/sql.html">
            
                    
                    Sql
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.4" >
            
                <span>
            
                    
                    Spring
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.4.1" data-path="../spring/spring.html">
            
                <a href="../spring/spring.html">
            
                    
                    Spring
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.5" >
            
                <span>
            
                    
                    SpringMVC
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.5.1" data-path="../springMVC/springMVC.html">
            
                <a href="../springMVC/springMVC.html">
            
                    
                    SpringMVC
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.6" >
            
                <span>
            
                    
                    整合
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.6.1" data-path="../整合/Mybatis框架.html">
            
                <a href="../整合/Mybatis框架.html">
            
                    
                    Mybatis框架
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.6.2" data-path="../整合/SpringBoot.html">
            
                <a href="../整合/SpringBoot.html">
            
                    
                    SpringBoot
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.6.3" data-path="../整合/springmvc框架.html">
            
                <a href="../整合/springmvc框架.html">
            
                    
                    Springmvc框架
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.6.4" data-path="../整合/spring框架.html">
            
                <a href="../整合/spring框架.html">
            
                    
                    Spring框架
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >010封装与关键字Static</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <p><strong>&#x5C01;&#x88C5;&#x662F;&#x4EC0;&#x4E48;</strong>
&#x5C01;&#x88C5;&#x53EF;&#x4EE5;&#x88AB;&#x8BA4;&#x4E3A;&#x662F;&#x4E00;&#x4E2A;&#x4FDD;&#x62A4;&#x5C4F;&#x969C;&#xFF0C;&#x9632;&#x6B62;&#x8BE5;&#x7C7B;&#x7684;&#x4EE3;&#x7801;&#x548C;&#x6570;&#x636E;&#x88AB;&#x5916;&#x90E8;&#x7C7B;&#x5B9A;&#x4E49;&#x7684;&#x4EE3;&#x7801;&#x968F;&#x673A;&#x8BBF;&#x95EE;&#x3002;</p>
<p>&#x4EE3;&#x7801;&#x6709;&#x4EC0;&#x4E48;&#x7F3A;&#x9677;&#xFF1F;
<img src="https://img-blog.csdnimg.cn/fc9973de7d4c40cf9cec00279f94aed9.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;">
&#x5982;&#x4F55;&#x89E3;&#x51B3;&#x4E0A;&#x9762;&#x8BBE;&#x8BA1;&#x7684;&#x7F3A;&#x9677;
<img src="https://img-blog.csdnimg.cn/d8c8883b23b2482198dd2558846da9bb.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;"></p>
<p><strong>&#x9762;&#x5411;&#x5BF9;&#x8C61;&#x7684;&#x4E09;&#x5927;&#x7279;&#x5F81;&#x4E4B;&#x4E00;  &#x2014;&#x2014;&#x5C01;&#x88C5;</strong>
&#x5C01;&#x88C5; &#x6982;&#x5FF5;
<img src="https://img-blog.csdnimg.cn/70b08a083ec74444aac921401bcb33b9.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;"></p>
<p><strong>&#x5C01;&#x88C5;&#x7684;&#x4E24;&#x4E2A;&#x5927;&#x81F4;&#x539F;&#x5219;</strong>
<img src="https://img-blog.csdnimg.cn/ce2fc112f9454456be63d1cd348e86f6.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;"></p>
<p><strong>&#x5982;&#x4F55;&#x5B9E;&#x73B0;&#x5C01;&#x88C5;</strong>
<img src="https://img-blog.csdnimg.cn/5f54a0646fd343c7b9cbf88daf9c47dd.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;">
<img src="https://img-blog.csdnimg.cn/6e64640c4df848d4a38382449a3a036c.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;">
<strong>&#x5305;&#x7684;&#x4F5C;&#x7528;</strong>
<img src="https://img-blog.csdnimg.cn/7aec2848939d411dbeb4f5e012800f35.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;"></p>
<ol>
<li>&#x5141;&#x8BB8;&#x7C7B;&#x7EC4;&#x6210;&#x8F83;&#x5C0F;&#x7684;&#x5355;&#x5143;&#xFF08;&#x7C7B;&#x4F3C;&#x6587;&#x4EF6;&#x5939;&#xFF09;&#xFF0C;&#x6613;&#x4E8E;&#x627E;&#x5230;&#x548C;&#x4F7F;&#x7528;&#x76F8;&#x5E94;&#x7684;&#x6587;&#x4EF6;</li>
<li>&#x9632;&#x6B62;&#x547D;&#x540D;&#x51B2;&#x7A81;&#x533A;&#x5206;&#x540D;&#x5B57;&#x76F8;&#x540C;&#x7684;&#x7C7B;</li>
<li>&#x6709;&#x52A9;&#x4E8E;&#x5B9E;&#x65F6;&#x8BBF;&#x95EE;&#x6743;&#x9650;&#x63A7;&#x5236;
<strong>&#x5982;&#x4F55;&#x521B;&#x5EFA;&#x5305;</strong>
<img src="https://img-blog.csdnimg.cn/bc950e9618d94762a90f28bbb540b4cc.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;">
&#x4F5C;&#x4E3A;Java&#x6E90;&#x4EE3;&#x7801;&#x7B2C;&#x4E00;&#x6761;&#x8BED;&#x53E5;
&#x7528; package &#x7533;&#x660E;&#x5305;&#xFF0C;&#x4EE5;&#x5206;&#x53F7;&#x7ED3;&#x5C3E;</li>
</ol>
<p><strong>&#x5305;&#x547D;&#x540D;&#x89C4;&#x8303;</strong></p>
<ul>
<li>&#x5305;&#x540D;&#x6709;&#x5C0F;&#x5199;&#x5B57;&#x6BCD;&#x7EC4;&#x6210;&#xFF0C;&#x4E0D;&#x80FD;&#x4EE5;&#x5706;&#x70B9;&#x5F00;&#x5934;&#x6216;&#x7ED3;&#x5C3E;</li>
<li>&#x62A5;&#x540D;&#x4E4B;&#x524D;&#x6700;&#x597D;&#x52A0;&#x4E0A;&#x552F;&#x4E00;&#x7684;&#x524D;&#x7F00;&#xFF0C;&#x901A;&#x5E38;&#x4F7F;&#x7528;&#x7EC4;&#x7EC7;&#x5012;&#x7F6E;&#x7684;&#x7F51;&#x7EDC;&#x57DF;&#x540D;</li>
<li>&#x5305;&#x540D;&#x540E;&#x7EED;&#x90E8;&#x5206;&#x4F9D;&#x4E0D;&#x540C;&#x673A;&#x6784;&#x5185;&#x90E8;&#x7684;&#x89C4;&#x8303;&#x4E0D;&#x540C;&#x800C;&#x4E0D;&#x540C;</li>
</ul>
<p>JDK&#x63D0;&#x4F9B;&#x57FA;&#x672C;&#x5305;</p>
<ul>
<li>java.lang&#xFF1A;&#x865A;&#x62DF;&#x673A;&#x81EA;&#x52A8;&#x5F15;&#x5165;</li>
<li>java.util&#xFF1A;&#x63D0;&#x4F9B;&#x4E00;&#x4E9B;&#x5B9E;&#x7528;&#x7C7B;</li>
<li>java.io:&#x8F93;&#x5165;&#x3001;&#x8F93;&#x51FA;</li>
</ul>
<p>&#x4F7F;&#x7528;MyEclipse&#x521B;&#x5EFA;&#x5305;&#x7684;&#x4E24;&#x79CD;&#x65B9;&#x6CD5;</p>
<ul>
<li>&#x5206;&#x522B;&#x521B;&#x5EFA;&#x5305;&#x548C;&#x7C7B;</li>
<li>&#x521B;&#x5EFA;&#x7C7B;&#x7684;&#x8FC7;&#x7A0B;&#x4E2D;&#x521B;&#x5EFA;&#x7C7B;&#x6240;&#x5728;&#x7684;&#x5305;</li>
</ul>
<p><strong>&#x5982;&#x4F55;&#x5BFC;&#x5165;&#x5305;</strong>
&#x4E3A;&#x4E86;&#x4F7F;&#x7528;&#x4E0D;&#x5728;&#x540C;&#x4E00;&#x5305;&#x4E2D;&#x7684;&#x7C7B;&#xFF0C;&#x9700;&#x8981; Java &#x7A0B;&#x5E8F;&#x4E2D;&#x4F7F;&#x7528; import &#x5173;&#x952E;&#x5B57;&#x5BFC;&#x5165;&#x8FD9;&#x4E2A;&#x7C7B;</p>
<pre><code>import &#x5305;&#x540D;.&#x7C7B;&#x540D;;
import java.util.*;    // &#x5BFC;&#x5165;java.util&#x5305;&#x4E2D;&#x6240;&#x6709;&#x7684;&#x7C7B;
import cn.jtest.classfirst.object; // &#x5BFC;&#x5165;&#x6307;&#x5B9A;&#x5305;&#x4E2D;&#x5236;&#x5B9A;&#x7C7B;
</code></pre><p><img src="https://img-blog.csdnimg.cn/f98d0740d674424d8738749d9db4cae9.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;">
&#x4F7F;&#x7528;&#x5305;&#x7684;&#x6CE8;&#x610F;&#x4E8B;&#x9879;&#xFF1A;</p>
<ol>
<li>&#x4E00;&#x4E2A;&#x7C7B;&#x540C;&#x65F6;&#x5F15;&#x7528;&#x4E86;&#x4E24;&#x4E2A;&#x6765;&#x81EA;&#x4E0D;&#x540C;&#x5305;&#x7684;&#x540C;&#x540D;&#x7C7B;<ul>
<li>&#x5FC5;&#x987B;&#x901A;&#x8FC7;&#x5B8C;&#x6210;&#x7684;&#x7C7B;&#x540D;&#x6765;&#x533A;&#x5206;</li>
</ul>
</li>
<li>&#x6BCF;&#x4E2A;&#x5305;&#x90FD;&#x662F;&#x72EC;&#x7ACB;&#x7684;&#xFF0C;&#x9876;&#x5C42;&#x5305;&#x4E0D;&#x4F1A;&#x5305;&#x542B;&#x5B50;&#x5305;&#x7684;&#x7C7B;</li>
<li>package &#x548C;import &#x7684;&#x987A;&#x5E8F;&#x662F;&#x56FA;&#x5B9A;&#x7684;<ul>
<li>package &#x5FC5;&#x987B;&#x4F4D;&#x4E8E;&#x7B2C;&#x4E00;&#x884C;&#xFF08;&#x5FFD;&#x7565;&#x6307;&#x6570;&#x884C;&#xFF09;</li>
<li>&#x53EA;&#x5141;&#x8BB8;&#x6709;&#x4E00;&#x4E2A;package&#x8BED;&#x53E5;</li>
<li>&#x5176;&#x6B21;&#x662F;import</li>
<li>&#x63A5;&#x7740;&#x662F;&#x7C7B;&#x7684;&#x7533;&#x660E;</li>
</ul>
</li>
</ol>
<p><strong>&#x7C7B;&#x7684;&#x8BBF;&#x95EE;&#x4FEE;&#x9970;&#x7B26;</strong>
public &#x4FEE;&#x9970;&#x7B26;&#xFF1A;&#x516C;&#x6709;&#x8BBF;&#x95EE;&#x7EA7;&#x522B;
&#x9ED8;&#x8BA4;&#x4FEE;&#x9970;&#x7B26;&#xFF1A;&#x5305;&#x7EA7;&#x79C1;&#x6709;&#x8BBF;&#x95EE;&#x7EA7;&#x522B;
|            | &#x540C;&#x4E00;&#x4E2A;&#x7C7B;&#x4E2D; | &#x540C;&#x4E00;&#x4E2A;&#x5305;&#x4E2D; | &#x4E0D;&#x540C;&#x5305;&#x4E2D; |
| :--------- | :--------- | :--------- | :------- |
| private    | &#x53EF;&#x4EE5;       | &#x4E0D;&#x53EF;&#x4EE5;     | &#x4E0D;&#x53EF;&#x4EE5;   |
| &#x9ED8;&#x8BA4;&#x4FEE;&#x9970;&#x7B26; | &#x53EF;&#x4EE5;       | &#x53EF;&#x4EE5;       | &#x4E0D;&#x53EF;&#x4EE5;   |
| protected  | &#x53EF;&#x4EE5;       | &#x53EF;&#x4EE5;       | &#x4E0D;&#x53EF;&#x4EE5;   |
| public     | &#x53EF;&#x4EE5;       | &#x53EF;&#x4EE5;       | &#x53EF;&#x4EE5;     |</p>
<p><img src="https://img-blog.csdnimg.cn/233b98d4ccf04dc682215bd7f55f18db.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;"></p>
<hr>
<p><strong>static&#x4FEE;&#x9970;&#x7B26;</strong>
statick&#x53EF;&#x4EE5;&#x7528;&#x6765;&#x4FEE;&#x9970;</p>
<ul>
<li>&#x6210;&#x5458;&#x53D8;&#x91CF;
&#x9759;&#x6001;&#x53D8;&#x91CF;&#xFF0C;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x901A;&#x8FC7;&#x7C7B;&#x540D;&#x8BBF;&#x95EE;</li>
<li>&#x6210;&#x5458;&#x65B9;&#x6CD5;
&#x9759;&#x6001;&#x65B9;&#x6CD5;&#xFF0C;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x901A;&#x8FC7;&#x7C7B;&#x540D;&#x8BBF;&#x95EE;</li>
<li>&#x4EE3;&#x7801;&#x5757;
&#x9759;&#x6001;&#x4EE3;&#x7801;&#x5757;&#xFF0C;&#x5F53;Java&#x865A;&#x62DF;&#x673A;&#x52A0;&#x8F7D;&#x7C7B;&#x65F6;&#xFF0C;&#x5C31;&#x4F1A;&#x6267;&#x884C;&#x8BE5;&#x4EE3;&#x7801;&#x5757;</li>
</ul>
<p>JVM&#x52A0;&#x8F7D;&#x7C7B;&#x65F6;&#xFF0C;&#x52A0;&#x8F7D;&#x9759;&#x6001;&#x4EE3;&#x7801;&#x5757;</p>
<ul>
<li>&#x5982;&#x679C;&#x6709;&#x591A;&#x4E2A;&#x9759;&#x6001;&#x5757;&#xFF0C;&#x6309;&#x987A;&#x5E8F;&#x52A0;&#x8F7D;</li>
<li>&#x6BCF;&#x4E2A;&#x9759;&#x6001;&#x4EE3;&#x7801;&#x5757;&#x53EA;&#x4F1A;&#x6267;&#x884C;&#x4E00;&#x6B21;
<img src="https://img-blog.csdnimg.cn/c560453d68384e1ba4eccb9d3f2a5023.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;">
<strong>&#x7C7B;&#x7684;&#x6210;&#x5458;&#x53D8;&#x91CF;</strong></li>
</ul>
<p>&#x7C7B;&#x53D8;&#x91CF;</p>
<ul>
<li>&#x88AB;static&#x4FEE;&#x9970;&#x7684;&#x53D8;&#x91CF;</li>
<li>&#x5728;&#x5185;&#x5B58;&#x4E2D;&#x53EA;&#x6709;&#x4E00;&#x4E2A;&#x62F7;&#x8D1D;</li>
<li>&#x7C7B;&#x5185;&#x90E8;&#xFF0C;&#x8BFE;&#x5728;&#x4EFB;&#x4F55;&#x65B9;&#x6CD5;&#x5185;&#x76F4;&#x63A5;&#x8BBF;&#x95EE;&#x9759;&#x6001;&#x53D8;&#x91CF;</li>
<li>&#x5176;&#x4ED6;&#x7C7B;&#x4E2D;&#xFF0C;&#xFF0C;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x901A;&#x8FC7;&#x7C7B;&#x540D;&#x8BBF;&#x95EE;</li>
</ul>
<p>&#x5B9E;&#x4F8B;&#x53D8;&#x91CF;</p>
<ul>
<li>&#x6CA1;&#x6709;&#x88AB;static&#x4FEE;&#x9970;&#x7684;&#x53D8;&#x91CF;</li>
<li>&#x6BCF;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x5B9E;&#x4F8B;&#xFF0C;&#x5C31;&#x4F1A;&#x4E3A;&#x5B9E;&#x4F8B;&#x53D8;&#x91CF;&#x5206;&#x914D;&#x4E00;&#x6B21;&#x5185;&#x5B58;&#xFF0C;&#x5B9E;&#x4F8B;&#x53D8;&#x91CF;&#x53EF;&#x4EE5;&#x5728;&#x5185;&#x5B58;&#x4E2D;&#x6709;&#x591A;&#x4E2A;&#x62F7;&#x8D1D;&#xFF0C;&#x4E92;&#x4E0D;&#x5F71;&#x54CD;
<img src="https://img-blog.csdnimg.cn/bfc3f65a302646cb90a6b72367b18f25.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;"></li>
</ul>
<p><strong>static&#x65B9;&#x6CD5;</strong></p>
<p>&#x9759;&#x6001;&#x65B9;&#x6CD5;&#xFF1A;&#x53EF;&#x76F4;&#x63A5;&#x901A;&#x8FC7;&#x7C7B;&#x540D;&#x8BBF;&#x95EE;</p>
<ul>
<li>&#x9759;&#x6001;&#x65B9;&#x6CD5;&#x4E2D;&#x4E0D;&#x80FD;&#x4F7F;&#x7528;this&#x548C;super</li>
<li>&#x4E0D;&#x80FD;&#x76F4;&#x63A5;&#x8BBF;&#x95EE;&#x7410;&#x4E8B;&#x96F7;&#x8FBE;&#x5B9E;&#x4F8B;&#x53D8;&#x91CF;&#x548C;&#x5B9E;&#x4F8B;&#x65B9;&#x6CD5;</li>
<li>&#x53EF;&#x76F4;&#x63A5;&#x8BBF;&#x95EE;&#x7C7B;&#x7684;&#x9759;&#x6001;&#x53D8;&#x91CF;&#x548C;&#x9759;&#x6001;&#x65B9;&#x6CD5;</li>
</ul>
<p>&#x5B9E;&#x4F8B;&#x65B9;&#x6CD5;&#xFF1A;&#x901A;&#x8FC7;&#x5B9E;&#x4F8B;&#x8BBF;&#x95EE;</p>
<ul>
<li>&#x53EF;&#x76F4;&#x63A5;&#x8BBF;&#x95EE;&#x6240;&#x5C5E;&#x7C7B;&#x7684;&#x9759;&#x6001;&#x53D8;&#x91CF;&#x3001;&#x9759;&#x6001;&#x65B9;&#x6CD5;&#x3001;&#x5B9E;&#x4F8B;&#x53D8;&#x91CF;&#x3001;&#x548C;&#x5B9E;&#x4F8B;&#x65B9;&#x6CD5;</li>
</ul>
<p>&#x9759;&#x6001;&#x65B9;&#x6CD5;&#x5FC5;&#x987B;&#x88AB;&#x5B9E;&#x73B0;</p>
<ul>
<li>main&#xFF08;&#xFF09;&#x5C31;&#x662F;&#x6700;&#x5E38;&#x7528;&#x7684;&#x9759;&#x6001;&#x65B9;&#x6CD5;</li>
</ul>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="009构造方法.html" class="navigation navigation-prev " aria-label="Previous page: 009构造方法">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="011 继承.html" class="navigation navigation-next " aria-label="Next page: 011 继承">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"010封装与关键字Static","level":"2.1.10","depth":2,"next":{"title":"011 继承","level":"2.1.11","depth":2,"path":"books/java/011 继承.md","ref":"books/java/011 继承.md","articles":[]},"previous":{"title":"009构造方法","level":"2.1.9","depth":2,"path":"books/java/009构造方法.md","ref":"books/java/009构造方法.md","articles":[]},"dir":"ltr"},"config":{"plugins":["search-pro","code","back-to-top-button","theme-comscore","intopic-toc","flexible-alerts","expandable-chapters"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"intopic-toc":{"selector":".markdown-section h1, .markdown-section h2, .markdown-section h3, .markdown-section h4, .markdown-section h5, .markdown-section h6","mode":"nested","maxDepth":6,"isCollapsed":true,"isScrollspyActive":true,"visible":true,"label":"In this article"},"search-pro":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"code":{"copyButtons":true},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-comscore":{},"back-to-top-button":{},"flexible-alerts":{"style":"callout","note":{"label":"Note","icon":"fa fa-info-circle","className":"info"},"tip":{"label":"Tip","icon":"fa fa-lightbulb-o","className":"tip"},"warning":{"label":"Warning","icon":"fa fa-exclamation-triangle","className":"warning"},"danger":{"label":"Attention","icon":"fa fa-ban","className":"danger"}},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"theme":"default","author":"作者","lang":"zh-cn","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"isbn":"图书编号","variables":{},"title":"书名","gitbook":"*","description":"描述"},"file":{"path":"books/java/010封装与关键字static.md","mtime":"2022-08-10T10:36:42.071Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2023-03-01T12:24:55.135Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-intopic-toc/anchor.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-intopic-toc/gumshoe.polyfills.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-intopic-toc/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-flexible-alerts/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-theme-comscore/test.js"></script>
        
    

    </body>
</html>

